Skip to content

Conversation

@alexander-alderman-webb
Copy link
Contributor

@alexander-alderman-webb alexander-alderman-webb commented Nov 24, 2025

Description

Cherry-picked from #5049

Issues

Closes TET-1208

Reminders

@linear
Copy link

linear bot commented Nov 24, 2025

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.99%. Comparing base (80ba8fb) to head (e913b9e).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...k/integrations/openai_agents/spans/invoke_agent.py 75.00% 0 Missing and 1 partial ⚠️
sentry_sdk/integrations/openai_agents/utils.py 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5141      +/-   ##
==========================================
- Coverage   84.02%   83.99%   -0.03%     
==========================================
  Files         180      180              
  Lines       18223    18230       +7     
  Branches     3233     3235       +2     
==========================================
+ Hits        15311    15313       +2     
- Misses       1922     1924       +2     
- Partials      990      993       +3     
Files with missing lines Coverage Δ
...k/integrations/openai_agents/spans/invoke_agent.py 86.11% <75.00%> (-1.77%) ⬇️
sentry_sdk/integrations/openai_agents/utils.py 89.77% <80.00%> (-0.71%) ⬇️

... and 3 files with indirect coverage changes

SPANDATA.GEN_AI_REQUEST_MESSAGES,
messages_data,
unpack=False,
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Empty messages no longer set span data

When request_messages is an empty list, truncate_and_annotate_messages returns None, causing the span data to not be set. Previously, the code would set SPANDATA.GEN_AI_REQUEST_MESSAGES to an empty JSON array even when request_messages was empty. This behavioral change could break code expecting this field to always exist when messages are processed.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants